package com.gambi.tapestry.components.gwtui;

import org.apache.tapestry5.annotations.RequestParameter;
import org.apache.tapestry5.json.JSONObject;

import com.gambi.tapestry.client.GWTUI;
import com.google.gwt.json.client.JSONString;
import com.trsvax.tapestry.gwt.annotation.GWT;

@GWT(entryPoint = GWTUI.class, entryPointName = "com.gambi.example.gwtUI", componentType = "LoginFormWidget")
public class LoginForm {

	@GWT
	Object onSubmit(@RequestParameter(value = "userid") String userId) {
		JSONObject resp = new JSONObject();
		resp.put("login", new JSONString("Ok"));
		return resp;
	}
}
